<div class="am-u-sm-12 widget main-w">
	<ol class="am-breadcrumb">
		<li><a href="{:url('/admin/index')}">首页</a></li>
		<li><a href="{:url('/admin/car/index')}">业务管理</a></li>
		<li class="am-active">保险管理</li>
	</ol>
	<form class="am-form-inline tpl-form-border-form" method="get" action="">
		<div class="am-u-sm-12 cl-p" >
			<div class="am-form-group am-u-sm-2">
				<div class="am-u-sm-12 po_relative cl-p">
					<input type="hidden" class="CarId" name="car_id" value="{$Think.get.car_id}" />
					<input type="text" class="am-form-field tpl-form-no-bg  car_number"  value="{$Think.get.car_number}" placeholder="点击选择车辆" readonly="">
					<span class="input-group-addon close-input"><i class="am-icon-close"></i></span>
				</div>
			</div>
			<div class="am-form-group am-u-sm-2 cl-p">
				<div class="am-u-sm-12 cl-p">
					<input type="text" name="insurance_company" class="tpl-form-input" value="{$Think.get.insurance_company}" placeholder="请输入保险公司名称">
				</div>
			</div>
			<div class="am-form-group am-u-sm-2 cl-p">
				<div class="am-u-sm-12">
					<select name="policy_type" data-am-selected="{btnWidth:'100%', btnSize: 'sm'}">
						<option value="0">不限险种</option>
						<option {$Think.get.policy_type==1?selected:""} value="1">交通强制险</option>
						<option {$Think.get.policy_type==2?selected:""} value="2">商业险</option>
					</select>
				</div>
			</div>
			<div class="am-u-sm-3 cl-p">
				<div class="am-form-group am-u-sm-12 cl-p">
					<div class="am-u-sm-12 cl-p">
						<div class="am-u-sm-6 cl-p">
							<div class="am-u-sm-11 cl-p">
								<input type="text" name="start_date" class="am-form-field tpl-form-no-bg" value="{$Think.get.start_date}" placeholder="起始时间" data-am-datepicker="" readonly="">
							</div>
							<div class="am-u-sm-1 cl-p" style="text-align: center;">-</div>
						</div>
						<div class="am-u-sm-6 cl-p">
							<div class="am-u-sm-12 cl-p">
								<input type="text" name="end_date" class="am-form-field tpl-form-no-bg" placeholder="结束时间" value="{$Think.get.end_date}" data-am-datepicker="" readonly="">
							</div>
						</div>
					</div>

				</div>
			</div>
			<div class="am-u-sm-3 ">
				<button type="submit" class="am-btn am-btn-sm am-btn-primary am-radius">查询<i class="am-icon-search"></i></button>
				<!--<button type="reset" class="am-btn am-btn-sm am-btn-primary am-radius" style="margin-top: -2px;">重置</button>-->
			</div>

		</div>
		
	</form>
	
	<div style="padding: 10px;" class="am-u-sm-12">
		<form class="am-form tpl-form-border-form tpl-form-border-br cl-p cl-m" action="outexcel" method="get">
			<input type="hidden"  name="car_id" value="{$Think.get.car_id}" />
			<input type="hidden" name="insurance_company"  value="{$Think.get.insurance_company}" >
			<input type="hidden" name="policy_type"  value="{$Think.get.policy_type}" >
			<input type="hidden" name="start_date" value="{$Think.get.start_date}" >
			<input type="hidden" name="end_date" value="{$Think.get.end_date}" >
		{if $Think.get.filter}
		<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
			<a href="{:url('index')}" class="am-btn am-btn-default">
				</span> 查看可用记录</a>
			<button  class="am-btn am-btn-default am-fr" style="float: right;">导出数据</button>
		</div>
		{else/}
		<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
			<a href="{:url('add')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</a>
			<button type="button" class="am-btn am-btn-default delete-multiple" data-method='deleteMultiple'><span class="am-icon-trash-o"></span> 删除</button>
			<a href="{:url('index')}?filter=delete" class="am-btn am-btn-default">查看已删除记录</a>
			<button  class="am-btn am-btn-default am-fr" style="float: right;">导出数据</button>
		</div>
		{/if}
		</form>
		<table width="100%" class="am-table am-table-compact am-table-bordered am-table-radius am-table-striped am-text-truncate tpl-table-black" id="insure">
			<thead>
				<tr>
					<th><input type="checkbox" data-checkall='1' class="check-all"/></th>
					<th>车牌号</th>
					<th>保险号</th>
					<th>投保人</th>
					<th>保险种类</th>
					<th>保险公司</th>
					<th>保险费用</th>
					<th>备注说明</th>
					<th>投保时间</th>
					<th>到期时间</th>
					<!--<th>详细</th>-->
					{if $op == 'search'} {else/}
					<th>操作</th>
					{/if}
				</tr>
			</thead>
			<tbody>
				{foreach $list as $key => $item}
				<tr class="gradeX" data-id="{$item.car_insure_id}">
					<th><input type="checkbox" class="check-list" /></th>
					<td>
						<a href="{:url('car/detail',['car_id'=>$item['car_id'] ])}?insure=1">{$item.number}</a>
					</td>
					<td>{$item.policy_number}</td>
					<td>{$item.policy_holder}</td>
					<td>{$item.policy_type==1?交通强制险:商业险}</td>
					<td>{$item.insurance_company}</td>
					<td>{$item.policy_charge}</td>
					<td>{$item.ps?:'无备注'}</td>
					<td>{$item.start_date}</td>
					<td>{$item.end_date}</td>
					<!--<td>
						<div class="tpl-table-black-operation">
							<a href="{:url('detail',['car_insure_id'=>$item['car_insure_id'] ])}">
								<i class="am-icon-pencil"></i> 查看详情
							</a>
						</div>
					</td>-->
					{if $op == 'search'} {else/}
					<td>
						<div class="tpl-table-black-operation">
							<a href="{:url('edit',['car_insure_id'=>$item.car_insure_id])}{if $Think.get.page}?page={$Think.get.page}{else/}?page=1{/if}">
								<i class="am-icon-pencil"></i> 编辑
							</a>
							<a class="tpl-table-black-operation-del delete-list" data-method="delete">
								<i class="am-icon-pencil"></i> 删除
							</a>
						</div>
					</td>
					{/if}
				</tr>
				{/foreach}
				<!-- more data -->
			</tbody>
		</table>
		<div class="am-u-sm-12 am-cf">
			<div class="am-fr">
				{$pager}
			</div>
		</div>
	</div>

</div>